package com.ha.controller.user;

import com.ha.result.Result;
import com.ha.service.BannerService;
import com.ha.vo.BannerVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * ClassName: BannerController
 * Package: com.ha.controller.user
 * Description:
 *
 * @Author 那啥啥
 * @Create 2024/5/2  20:58
 * @Version 1.0
 */
@RestController("UserBanner")
@RequestMapping("/user/banner")
@Slf4j
public class BannerController {

    @Autowired
    private BannerService bannerService;
    @GetMapping
    public Result<List<BannerVO>> getBanner(){
        log.info("请求访问轮播图");
       List<BannerVO> bannerVOList =  bannerService.getBanner();
       return Result.success(bannerVOList);
    }
}
